package com.cloudcc.mobile.dao.impl;

import java.util.List;

import com.cloudcc.cloudframe.net.async.EventRequest;
import com.cloudcc.mobile.dao.BaseEngine;
import com.cloudcc.mobile.dao.CustomerEngine;
import com.cloudcc.mobile.entity.ContactEntity;
import com.cloudcc.mobile.entity.CustomerEntity;
import com.cloudcc.mobile.entity.LeadEntity;
import com.cloudcc.mobile.event.CustomerEventList.ContactListEvent;
import com.cloudcc.mobile.event.CustomerEventList.CustomerListEvent;
import com.cloudcc.mobile.event.CustomerEventList.LeadListEvent;

public class CustomerEngineImpl extends BaseEngine implements CustomerEngine {

	@Override
	public void getLeadList(int page, String exps, LeadListEvent event) {
		EventRequest<List<LeadEntity>> request = new EventRequest<List<LeadEntity>>(){};
		request.setEvent(event);
		queryObjAPiWithRole("Lead", page, exps, request);
	}

	@Override
	public void getContactList(int page, String exps, ContactListEvent event) {
		EventRequest<List<ContactEntity>> request = new EventRequest<List<ContactEntity>>(){};
		request.setEvent(event);
		queryObjAPiWithRole("Contact", page, exps, request);
	}

	@Override
	public void getCustomerList(int page, String exps, CustomerListEvent event) {
		EventRequest<List<CustomerEntity>> request = new EventRequest<List<CustomerEntity>>(){};
		request.setEvent(event);//
		queryObjAPiWithRole("Account", page, exps, request);
	}

}
